<template>
  <div class="alladrs">
    <div class="top between">
      <div class="searchbox">
        <i class="iconfont icon-search"></i>
        <input type="text " placeholder="输入城市名或拼音" />
      </div>
      <span class="font" @click="gotop()">取消</span>
    </div>
    <div class="dinwei between">
      <p>当前定位</p>
      <div class="dangqian">
        <div>
          <i class="iconfont icon-daohang"></i>
          <span>{{ this.$store.state.city }}</span>
        </div>
        <span class="s2" @click="reset()">重新定位</span>
      </div>
    </div>
    <Addresslist />
  </div>
</template>

<script>
import Addresslist from "./Homecontent/addresslist.vue";
export default {
  methods: {
    reset() {
      this.$store.commit("upcity", { newcity: "西安市" });
    },
    gotop() {
      this.$router.go(-1);
    },
  },
  components: {
    Addresslist,
  },
};
</script>

<style scoped>
.between {
  padding: 0 0.1rem;
}
.alladrs {
  width: 100%;
  background-color: #f5f5f5;
}
.top {
  height: 0.58rem;
  width: 100%;
  padding: 0.1rem 0.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  margin-bottom: 0.03rem;
}
.searchbox {
  width: 2.95rem;
  height: 0.4rem;
  background-color: #f5f5f5;
  border-radius: 0.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 0.14rem;
}
input {
  background-color: #f5f5f5;
  margin-left: 0.06rem;
}
.icon-search {
  margin-left: 0.24rem;
}
.font {
  font-size: 0.18rem;
  color: #1ea4ea;
}
.dinwei {
  height: 0.8rem;
  width: 100%;
  background-color: #fff;
  margin-bottom: 0.1rem;
}
p {
  height: 0.28rem;
  font-size: 0.14rem;
  color: #979797;
  line-height: 0.42rem;
}
.dangqian {
  height: 0.54rem;
  font-size: 0.18rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.icon-daohang {
  color: #1ea4ea;
}
.s2 {
  color: #1ea4ea;
}
</style>